package session;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

/**
 * Application Lifecycle Listener implementation class GameSession
 *
 */

@ManagedBean
@SessionScoped
public class GameSessionListener  {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public String destroySession(){
		FacesContext.getCurrentInstance().getExternalContext().invalidateSession();
		System.out.println("session destroyed");
		return "login.xhtml";
		
	}
    

	
}
